package com.lxq.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 龙小虬
 * @date 2021/3/24 14:53
 */
@RestController
public class MyController {

    @Value("${name}")
    private String name;

    @RequestMapping(value = "/test",produces = "text/plain;charset=UTF-8")
    public String test(){
        System.out.println(name);
        return "手动注入my.properties"+name;
    }
}
